import 'package:flutter/material.dart';
import 'package:flutter_enjoy_plus/router/index.dart';
import 'package:flutter_enjoy_plus/stores/counter.dart';
import 'package:provider/provider.dart';

void main() {
  runApp(ChangeNotifierProvider(
    //全局注入实例
    create: (context) => Counter(),
    //其他配置...
    child: MaterialApp(
      //路由组件的配置
      routes: RouterManager.routes,
      //路由拦截配置
      onGenerateRoute: (settings) => RouterManager.generateRoute(settings),
      //初始化的加载路由的路径
      initialRoute: '/',
    ),
  ));
}
